var vm = new Vue({
  el: "#app",
  data:{
    activityId:"",
    pic:"",
    name:"",
    cost:"",
    cost_type:"",
  },
  mounted:function() {
    this.init();
  },
  methods:{
    init:function(){
      console.log(app.GetQueryValue("activityId"));
        
        if(app.GetQueryValue("activityId")!=null){
        this.activityId=app.GetQueryValue("activityId");
        var that = this;
        $.ajax({
          url: app.webUrl + "/view/api_activity/info",
          type: "POST",
          data: {id:that.activityId},
          success: function (ret) {
            if (ret.code == 1) {
              console.log(ret);
              vm.activityId = ret.data.id;
              vm.name = ret.data.name;
              vm.pic = ret.data.pic;
              vm.cost = ret.data.cost;
              vm.cost_type=ret.data.cost_type;
            }
          },
        });
      }
    },
    link:function(){
      window.location.href='/view/activity/hdxq.html?&activityId='+vm.activityId;
    },
  },
})


// $(document).ready(function(){
//   console.log($('.ic span:nth-of-type(1)'));
// });

// $('.ic span:nth-of-type(2)').click(function() {
//   window.location.href='../html/fbhd.html'
// })


// function fenxiang() { 
//   $('.cover').show() 
// }